package com.yitiao.designmodel.create.factory.simplefactory;

/**
 * 简单/静态工厂，少数产品
 */
public class CarFactory {

   public static Car getCar(String type){
        if (type.equals("sport")){
            return new SportsCar();
        }else if (type.equals("suv")){
            return new SuvCar();
        }else {
            return null;
        }
    }
}
